<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <title>Saw96X - 个人博客</title>
</head>
<body>
<!--<img class="ui fluid image m-background">-->
<!--导航-->
<nav th:replace="_fragments :: menu(1)"></nav>

<!--    中间内容-->
<div class="m-padded-tb-large m-opacity-mini m-container">
    <div class="ui container">
        <div class="ui stackable grid">
            <!--            左边的博客列表 -->
            <div class="eleven wide column m-shadow-small">
                <!--                header-->
                <div class="ui top  attached segment">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <h3 class="ui violet header">博客</h3>
                        </div>
                        <div class="right aligned column">
                            共 <h2 class="ui violet header m-inline-block m-text-thin"  th:text="${page.totalElements}"> 14 </h2> 篇博客
                        </div>
                    </div>
                </div>

                <!--                content博客列表-->
                <div class="ui attached segment">
                    <div class="ui padded vertical segment m-padded-tb-large"  th:each="blog : ${page.content}">
                        <div class="ui mobile reversed stackable grid">
                            <div class="ui eleven wide column">
                                <h3 class="ui header ">
                                    <a href="#" class="m-black" target="_blank" th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.title}">
                                        你真的理解什么是财富自由吗？
                                    </a>
                                </h3>
                                <p th:text="|${blog.description}|">
                                    这些话就是测试用的，要看样式，别看这个文字，我相信你不会无聊的看这个吧。。。asdfasdfasdfasdfasdfasfdasdfasd
                                </p>
                                <div class="ui grid">
                                    <div class="eleven wide column">
                                        <div class="ui horizontal link list">
                                            <div class="item">
                                                <img src="https://unsplash.it/110/110?image=1004" th:src="@{${blog.user.avatar}}" alt=""
                                                     class="ui avatar image">
                                                <div class="content">
                                                    <div class="header" th:text="${blog.user.nickname}"><a href="#">南望96X</a></div>
                                                </div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i><span th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-10-1</span>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i><span th:text="${blog.views}">2342</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" target="_blank" class="ui violet basic label" th:text="${blog.type.name}">认知升级</a>
                                    </div>
                                </div>
                            </div>
                            <div class="ui five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img src="https://unsplash.it/180/110?image=1005" th:src="@{${blog.firstPicture}}" alt="" class="ui fluid rounded image">
                                </a>
                            </div>
                        </div>
                    </div>
                </div>

                <!--                bottom分页条-->
                <div class="ui bottom attached segment" th:if="${page.totalPages}>1">
                    <div class="ui middle aligned two column grid">
                        <div class="column">
                            <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}" class="ui violet basic button">上一页</a>
                        </div>
                        <div class="right aligned column">
                            <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}" class="ui violet basic button">下一页</a>
                        </div>
                    </div>
                </div>
            </div>
            <!--            右边的卡片-->
            <div class="five wide column">
                <!--                分类-->
                <div class="ui segments m-margin-tb-large m-shadow-small">
                    <div class="ui teal secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="right aligned column">
                                <a href="#" target="_blank">more<i class="angle double right icon"></i> </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <div class="ui fluid vertical menu">
                            <a href="#" class="item" th:each="type : ${types}">
                                <span th:text="${type.name}">学习日志</span>
                                <div class="ui blue basic left pointing label" th:text="${#arrays.length(type.blogs)}">
                                    13
                                </div>
                            </a>
                        </div>
                    </div>
                </div>
                <!--                标签-->
                <div class="ui segments m-margin-tb-large m-shadow-small">
                    <div class="ui violet secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="target icon"></i>标签
                            </div>
                            <div class="right aligned column">
                                <a href="#" target="_blank">more<i class="angle double right icon"></i> </a>
                            </div>
                        </div>
                    </div>
                    <div class="ui violet segment">
                        <a th:each="tag : ${tags}" href="#" class="ui green basic left pointing label m-margin-tb-small">
                            <span th:text="${tag.name}">Java</span> <div th:text="${#arrays.length(tag.blogs)}" class="detail">23</div>
                        </a>
                    </div>
                </div>
                <!--                最新推荐-->
                <div class="ui segments m-margin-tb-large m-shadow-small">
                    <div class="ui secondary red segment">
                        <i class="bookmark icon"></i>最新推荐
                    </div>
                    <div class="ui segment red" th:each="blog : ${recommendBlogs}">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" th:text="${blog.title}" class="m-black m-text-thin">中国的红色政权</a>
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>
<!--    底部-->
<footer th:replace="_fragments :: footer"></footer>

<script crossorigin="anonymous" integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
src="https://lib.baomitu.com/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });
</script>
<script type="text/javascript" color="0,0,255" opacity='1' zIndex="-1" count="150"
        src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
<th:block th:replace="_fragments :: script"></th:block>

</body>
</html>
